Java code coverage tools
part 9/13 · 22.4 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Cobertura
Cobertura is an open-source tool for measuring code coverage. It does so by instrumenting the byte code. It was the predecessor to JaCoCo.
EMMA
EMMA is an open-source toolkit for measuring and reporting Java code coverage. EMMA is distributed under the terms of Common Public License v1.0.
Features
• instrument classes for coverage either offline (before they are loaded) or on the fly (using an instrumenting application classloader).
• Supported coverage types: class, method, line, basic block. EMMA can detect when a single source code line is covered only partially.
• Coverage stats are aggregated at method, class, package, and "all classes" levels.
• Output report types: plain text, HTML, XML. All report types support drill-down, to a user-controlled detail depth. The HTML report supports source code linking.
• Output reports can highlight items with coverage levels below user-provided thresholds.
• Coverage data obtained in different instrumentation or test runs can be merged.
• it is possible to dump or reset coverage data remotely and without a JVM exit.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────